package com.gyh.system.gen.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.gyh.system.common.persistence.BaseController;
import com.gyh.system.common.utils.R;
import com.gyh.system.gen.service.ColumnsService;

/**
* @author 作者 gyh:
* @version 创建时间：2018年5月2日 下午10:14:22
* 
*/
@RestController
@CrossOrigin
@RequestMapping("/column")
public class ColumnController  extends BaseController{

	@Autowired
	private ColumnsService columnsService;
	
	@GetMapping("database")
	public R getTables(String table) {
		return R.ok(columnsService.searchColumns(table));
	}
	
}
